package com.test.OrderPattern;

/**
 * 调用Broker类执行方法
 *
 * @author muxiaoyu
 * @create 2017/06/19 17:21
 **/
public class OrderPatternDemo {
    public static void main(String[] args) {
        Stock stock = new Stock();
        BuyStock buyStock = new BuyStock(stock);
        SellStock sellStock = new SellStock(stock);

        Broker broker = new Broker();
        broker.takeOrder(buyStock);
        broker.takeOrder(sellStock);
        broker.placeOrders();
    }
}
